@openpresentation/opf 0.26.3 → 0.26.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/browser.js +13 -11
- package/dist/{chunk-34LIUOT7.js → chunk-6IXSHIAL.js} +6 -6
- package/dist/{chunk-PXOXTJTN.js → chunk-6NBTZYYD.js} +1 -1
- package/dist/{chunk-FXNUM2PN.js → chunk-EDCRBTJF.js} +4 -4
- package/dist/chunk-GWJBZ4LC.js +639 -0
- package/dist/{chunk-YVNFACTC.js → chunk-H5QC3X3K.js} +1 -1
- package/dist/{chunk-WASENX2R.js → chunk-MN7DRK57.js} +40 -648
- package/dist/{chunk-GLLR3AQ5.js → chunk-NZLW6FBQ.js} +1 -1
- package/dist/{chunk-7RY7QWWJ.js → chunk-O6BY3AU2.js} +1 -1
- package/dist/{chunk-PB5X2VSV.js → chunk-PIO73BQ6.js} +4 -3
- package/dist/{chunk-DEI2M2H6.js → chunk-QAEBYDKY.js} +2 -4
- package/dist/{chunk-54OV2WQC.js → chunk-QH2W6HIM.js} +1 -1
- package/dist/chunk-RYZPBJLB.js +4 -0
- package/dist/{chunk-NJWI6MPT.js → chunk-XFOOKVRI.js} +16 -1
- package/dist/{chunk-2ZQBMZTZ.js → chunk-ZSZDVIDV.js} +2 -2
- package/dist/{conversion-BjsKgxBZ.d.ts → conversion-DSafOGzh.d.ts} +2 -2
- package/dist/conversion-QIAJM6DQ.js +20 -0
- package/dist/convert.js +5 -5
- package/dist/deck.js +9 -7
- package/dist/diff.js +2 -2
- package/dist/docs.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +17 -15
- package/dist/markdown.js +7 -5
- package/dist/node-engine.d.ts +2 -2
- package/dist/node-engine.js +17 -15
- package/dist/pagination.js +2 -2
- package/dist/patch.js +1 -1
- package/dist/schema.js +1 -1
- package/dist/source.d.ts +102 -4
- package/dist/source.js +388 -9
- package/dist/validator.js +1 -1
- package/dist/yaml.js +5 -4
- package/package.json +5 -5
- package/dist/conversion-F4UCOGR7.js +0 -18
package/README.md
CHANGED
|
@@ -99,7 +99,7 @@ The layout engine's names are not on the root. `composeSlide`, `fitText`, `layou
|
|
|
99
99
|
|
|
100
100
|
### Source editing: schema field queries, text addressing and syntax recovery
|
|
101
101
|
|
|
102
|
-
Two browser-safe subpaths for source editors, the CLI and agents. `@openpresentation/opf/schema` reads the field model of a document from the JSON Schemas: `describeField(path, document?)` returns the types, description, enum values, default, examples, whether the parent requires it, the `oneOf` variants (and `primary`, the form a template should use), the ranked `children` of an object (required first, then the curated `COMMON_KEYS` order, then alphabetical; promoted regions, `extensions` and `$schema` are `advanced`), the item schema of an array (`itemInfo`) or map (`entryInfo`), `requiredChildren` and `freeText`, and `{ known: false }` for a path the schema does not describe; `catalogKindAt(path, document?)` names the catalog a reference field points into (`layouts`, `themes`, `colorSchemes`, `fontSchemes`, `narratives`, `audiences`, `purposes`, `tones`) from `schemaCatalogKinds` (also exported), core-side metadata keyed by schema name and JSON Pointer; the published schemas carry no vendor keyword and compile under strict Ajv, so a new reference field is one entry there and needs no editor change. The navigation helpers it is built on are exported too (`resolveSchema`, `schemaVariants`, `activeSchema`, `schemaAtPath`, `createSchemaValue`, `listSchemaFields`, `splitOpfPath`). `@openpresentation/opf/source` turns text into positions and back: `locate(text,
|
|
102
|
+
Two browser-safe subpaths for source editors, the CLI and agents. `@openpresentation/opf/schema` reads the field model of a document from the JSON Schemas: `describeField(path, document?)` returns the types, description, enum values, default, examples, whether the parent requires it, the `oneOf` variants (and `primary`, the form a template should use), the ranked `children` of an object (required first, then the curated `COMMON_KEYS` order, then alphabetical; promoted regions, `extensions` and `$schema` are `advanced`), the item schema of an array (`itemInfo`) or map (`entryInfo`), `requiredChildren` and `freeText`, and `{ known: false }` for a path the schema does not describe; `catalogKindAt(path, document?)` names the catalog a reference field points into (`layouts`, `themes`, `colorSchemes`, `fontSchemes`, `narratives`, `audiences`, `purposes`, `tones`) from `schemaCatalogKinds` (also exported), core-side metadata keyed by schema name and JSON Pointer; the published schemas carry no vendor keyword and compile under strict Ajv, so a new reference field is one entry there and needs no editor change. The navigation helpers it is built on are exported too (`resolveSchema`, `schemaVariants`, `activeSchema`, `schemaAtPath`, `createSchemaValue`, `listSchemaFields`, `splitOpfPath`). `@openpresentation/opf/source` turns text into positions and back: `locate(text, format, pointer, { part })` is the range of a JSON Pointer in JSON, YAML or Markdown (`value`, `key`, `entry`, `open` or `colon`; the nearest ancestor with `exact: false` when the node is missing; a Markdown slide field is located by the same ranges its findings use: the `layout=` token of an options comment, the text after `# ` or `- `), `pathAt(text, format, offset)` the path under a caret, `scanMarkdown(text)` the regions of a Markdown deck (front matter, slides, option comments, fences, notes) with the dialect's vocabulary (`SLIDE_OPTION_KEYS`, `BLOCK_OPTION_KEYS`, `FENCE_KINDS`, `METRIC_KEYS`), and `analyzeJsonSyntax(text, { limit })` the root cause of each JSON syntax error, once, in position order (at most five), with a range, a message, a hint and the fixes that repair it (`Insert comma`, `Add { }`, `Remove "design"`, `Insert }`, `Use double quotes`, ...); `validate(text)` reports the same causes as `opf/json-syntax` findings. See [validate](../../docs/validate.md).
|
|
103
103
|
|
|
104
104
|
### Validate (0.14.0)
|
|
105
105
|
|
package/dist/browser.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { OPFApiError } from './chunk-
|
|
2
|
-
export { OPFApiError, OPFExportError, OPFImportError, OPFMoveToCustomError, copySlides, edit, embed, fill, fillRecords, localAssetSources, moveToCustom, parseSlideSelection, sameRecord, stats, updateFromCatalog } from './chunk-
|
|
1
|
+
import { OPFApiError } from './chunk-NZLW6FBQ.js';
|
|
2
|
+
export { OPFApiError, OPFExportError, OPFImportError, OPFMoveToCustomError, copySlides, edit, embed, fill, fillRecords, localAssetSources, moveToCustom, parseSlideSelection, sameRecord, stats, updateFromCatalog } from './chunk-NZLW6FBQ.js';
|
|
3
3
|
export { specFileEntries, specFileKinds, specFilePaths } from './chunk-UJSAR6GF.js';
|
|
4
4
|
export { FONT_POLICY, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor } from './chunk-PJSPHHRK.js';
|
|
5
5
|
export { OPFDataImportError, ingest, parseTabularData } from './chunk-TKQ2VFV5.js';
|
|
6
|
-
export { OPFPaginationError, paginate, paginateSlide } from './chunk-
|
|
7
|
-
export { DECK_FORMATS, deckFormatOf, parse, stringify } from './chunk-
|
|
8
|
-
export { fromMarkdown, toMarkdown } from './chunk-
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
11
|
-
|
|
12
|
-
import './chunk-
|
|
13
|
-
export {
|
|
14
|
-
|
|
6
|
+
export { OPFPaginationError, paginate, paginateSlide } from './chunk-QH2W6HIM.js';
|
|
7
|
+
export { DECK_FORMATS, deckFormatOf, parse, stringify } from './chunk-EDCRBTJF.js';
|
|
8
|
+
export { fromMarkdown, toMarkdown } from './chunk-GWJBZ4LC.js';
|
|
9
|
+
import './chunk-PIO73BQ6.js';
|
|
10
|
+
import './chunk-RYZPBJLB.js';
|
|
11
|
+
import './chunk-MN7DRK57.js';
|
|
12
|
+
import './chunk-O6BY3AU2.js';
|
|
13
|
+
export { OPFMarkdownError } from './chunk-QAEBYDKY.js';
|
|
14
|
+
import './chunk-6NBTZYYD.js';
|
|
15
|
+
export { diff, merge } from './chunk-H5QC3X3K.js';
|
|
16
|
+
export { CATALOG_SCHEMA, DEFAULT_VALIDATION_THRESHOLDS, OPFPatchError, OPFPatchValidationError, OPFValidationError, applyPatch, assertValid, assertValidCatalogRecord, catalogDisplayKinds, catalogSchemaNames, findValidationRule, resolveSlideContext, validate, validateCatalogRecord, validationCategories, validationRules } from './chunk-XFOOKVRI.js';
|
|
15
17
|
export { CATALOG_GROUP_PATTERN, CATALOG_REFERENCE_PATTERN, CHART_TYPES, DEFAULT_VARIABLE_DATE_FORMAT, ENGINE_DEFAULT_CHART_TYPES, ENGINE_DEFAULT_COLOR_SCHEME, ENGINE_DEFAULT_FONT_SCHEME, ENGINE_DEFAULT_THEME, LANGUAGES, LOGO_SHAPES, OPFCatalogsOptionError, OPFUnresolvedReferenceError, OPFVariableError, SLIDE_SCOPED_BUILTINS, SOCIAL_PLATFORMS, VARIABLE_KINDS, catalogGroupSource, catalogKinds, catalogRecords, catalogReferenceSites, chartNumber, coerceVariableValue, datasetDiagnostics, formatDataNumber, formatVariableNumber, fromExcelNumberFormat, hasContentVariables, inlineChartData, inlineDatasets, inlineTableData, isDatasetRef, isTemplate, isXYChartType, listBuiltinVariables, listVariables, normalizeLanguageFamily, numberFormatError, parseReference, resolveChartData, resolveDesignRecords, resolveFontScheme, resolveReference, resolveSlideVariables, resolveTableData, resolveVariables, suggestChartNumberFix, tableCellDisplayValue, toExcelNumberFormat, unresolvedReference, unusedDatasets, variableDeclarations } from './chunk-XRMV2GMB.js';
|
|
16
18
|
export { OPFFormatError, format } from './chunk-EQ6S5SEZ.js';
|
|
17
19
|
export { audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './chunk-F4HFDP6I.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defaultCatalogs } from './chunk-
|
|
2
|
-
import { localAssetSources, OPFApiError, parseSlideSelection, OPFExportError, asApiError, OPFImportError } from './chunk-
|
|
3
|
-
import { paginate } from './chunk-
|
|
4
|
-
import { deckFormatOf, readDeckReport, stringify } from './chunk-
|
|
5
|
-
import { validate, OPFValidationError } from './chunk-
|
|
1
|
+
import { defaultCatalogs } from './chunk-ZSZDVIDV.js';
|
|
2
|
+
import { localAssetSources, OPFApiError, parseSlideSelection, OPFExportError, asApiError, OPFImportError } from './chunk-NZLW6FBQ.js';
|
|
3
|
+
import { paginate } from './chunk-QH2W6HIM.js';
|
|
4
|
+
import { deckFormatOf, readDeckReport, stringify } from './chunk-EDCRBTJF.js';
|
|
5
|
+
import { validate, OPFValidationError } from './chunk-XFOOKVRI.js';
|
|
6
6
|
import { link, stat, readdir, lstat, readFile, open, unlink, mkdir, rename } from 'fs/promises';
|
|
7
7
|
import path6 from 'path';
|
|
8
8
|
import { readFileSync, statSync, realpathSync } from 'fs';
|
|
@@ -117,7 +117,7 @@ function localAssetProblems(deck, root) {
|
|
|
117
117
|
}
|
|
118
118
|
var RENDER_PACKAGE = "@openpresentation/opf-render";
|
|
119
119
|
var PPTX_PACKAGE = "@openpresentation/opf-pptx";
|
|
120
|
-
var PEER_RANGES = { [RENDER_PACKAGE]: "^0.26.
|
|
120
|
+
var PEER_RANGES = { [RENDER_PACKAGE]: "^0.26.4", [PPTX_PACKAGE]: "^0.26.4" };
|
|
121
121
|
var PPTX_TEXT_OPTIONS_FROM = "0.22.0";
|
|
122
122
|
var numbers = (version) => version.replace(/[-+].*$/, "").split(".").map((part) => Number.parseInt(part, 10) || 0);
|
|
123
123
|
function atLeast(version, minimum) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { fromMarkdown, toMarkdown } from './chunk-
|
|
2
|
-
import { fromYaml, toYaml } from './chunk-
|
|
3
|
-
import { NOT_CHECKED } from './chunk-
|
|
4
|
-
import { parseSource, validate, OPFValidationError } from './chunk-
|
|
1
|
+
import { fromMarkdown, toMarkdown } from './chunk-GWJBZ4LC.js';
|
|
2
|
+
import { fromYaml, toYaml } from './chunk-PIO73BQ6.js';
|
|
3
|
+
import { NOT_CHECKED } from './chunk-RYZPBJLB.js';
|
|
4
|
+
import { parseSource, validate, OPFValidationError } from './chunk-XFOOKVRI.js';
|
|
5
5
|
import { checkCatalogsOption } from './chunk-XRMV2GMB.js';
|
|
6
6
|
|
|
7
7
|
// src/deck-report.ts
|